export function useTableFormatter() {
  // 时间格式化
  function timeFormatter(row, column, cellValue) {
    const formatter = new Intl.DateTimeFormat('zh-CN', {
      year: 'numeric',
      month: '2-digit',
      day: '2-digit',
      hour: '2-digit',
      minute: '2-digit',
      second: '2-digit',
      hour12: false,
    });

    return formatter.format(new Date(cellValue));
  }
  // 基础内容格式化
  function emptyFormatter(row, column, cellValue) {
    return cellValue || cellValue === 0 ? cellValue : '--';
  }
  return {
    timeFormatter,
    emptyFormatter,
  };
}
